package com.cn.lp.export.server.entity.convert;

import com.cn.lp.export.server.entity.ExportStatus;

import javax.persistence.AttributeConverter;
import java.util.LinkedHashMap;

/**
 * Created by qirong on 2020/10/18.
 */
public class ExportStatusConvert implements AttributeConverter<ExportStatus, String> {

    @Override
    public String convertToDatabaseColumn(ExportStatus exportStatus) {
        return exportStatus.name();
    }

    @Override
    public ExportStatus convertToEntityAttribute(String s) {
        return ExportStatus.valueOf(s);
    }
}
